import { Form, Input, Select } from '@alifd/next';

interface Props {
  submit: (values: any, item: any) => void;
  field: any;
}

function Filter({ submit, field }: Props) {
  return (
    <Form responsive colon fullWidth labelAlign="left" labelTextAlign="left" field={field} onChange={submit}>
      <Form.Item colSpan={4} name="name" label="角色名称">
        <Input hasClear />
      </Form.Item>
      <Form.Item colSpan={4} name="code" label="角色编码">
        <Input placeholder="请输入" hasClear />
      </Form.Item>
      <Form.Item colSpan={4} name="status" label="状态">
        <Select
          placeholder="请选择"
          hasClear
          dataSource={[
            { value: 1, label: '启用' },
            { value: 2, label: '禁用' },
          ]}
        />
      </Form.Item>
    </Form>
  );
}

export default Filter;
